package com.sun.temp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sun.temp.bean.WeightBean2;
import com.sun.temp.mapper.mapper2.WeightDao2;
import com.sun.temp.service.WeightService2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * <p>
 * $ {description}
 * </p>
 *
 * @author: Mr.Wang
 * @create: 2025-08-25 14:48
 **/
@Service
@Slf4j
public class WeightService2Impl extends ServiceImpl<WeightDao2, WeightBean2> implements WeightService2 {

    @Resource
    private WeightDao2 weightDao;

    @Override
    public WeightBean2 getSgByGrade(String grade) {
        WeightBean2 bean2 = this.baseMapper.getSgByGrade(grade);
        return bean2;
    }

    @Override
    public List<WeightBean2> getSgListByGrade(String grade) {
        return this.baseMapper.getSgListByGrade(grade);
    }

    @Override
    public void updateWeight(WeightBean2 weight) {

    }

    @Override
    public boolean saveWeight(WeightBean2 weight) {
        this.baseMapper.insert(weight);
        return true;
    }

//    @Override
//    public void removeByBatch(String batch) {
//        this.baseMapper.removeByBatch(batch);
//    }

    @Override
    public List<WeightBean2> getAllGrade() {
        return this.baseMapper.getAllGrade();
    }

}
